import {getUuid} from "@/common/commonUnits";

/**
 * 折线图数据格式化
 * {
 *     [
 *      name:name,
 *      stack:stack, // 堆叠
 *      data:[]
 *     ]
 * }
 * @param data
 */
export function lineTacks(data){
    return data.map(i=>{
        return {
            name:i.name,
            data:i.data,
            colorBy:i.colorBy ?? 'series',
            type:'line',
            stack:i.stack ?? getUuid(),
            smooth: i.smooth ?? false
        }
    })
}